<#include "/common/layout.html">
<@header>
<link rel="stylesheet" media="screen" href="../../../app/css/style.css">
</@header>
<@body>
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      <small>项目管理 > 项目列表</small>
    </h1>
  </section>
  <!-- Main content -->
  <section class="content">
    <!-- Your Page Content Here -->
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
         <form action="/u/project/list/1" method="post" class="form-inline">
          <div class="box-header">
	            <div class="input-group">
	            	<a class="btn btn-primary dialog" href="javascript:;" data-title="创建项目" data-url="/u/project/add" data-width="800" data-height="400"><i class="fa fa-plus"></i> 创建项目</a>
	            </div>
             <div class="input-group">
               <input type="text" name="search" value="${search!}" class="form-control" placeholder="Search">
               <div class="input-group-btn">
                 <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                 <a href="/u/project/list/1" class="btn btn-default"><i class="fa fa-refresh"></i></a>
               </div>
            </div>
            <div class="input-group pull-right">
                 <button type="button" class="btn btn-primary btn-flat" onclick="exportTo('项目数据');"><i class="fa fa-file-excel-o"></i> 导出</button>
            </div>
          </div><!-- /.box-header -->
          </form>
          <div class="table-responsive">
            <table class="table table-striped table-content">
              <tr>
                <th  style="width: 50px">行号</th>
                <th>项目名称</th>
                <th>项目HOST</th>
                <th>项目描述</th>
                <th style='text-align: center;' width="120px">操作</th>
              </tr>
              <#list pageData.getRecords() as project>
              	  <tr>
	                <td class="content table-content-hidden">${((pageData.current-1)*pageData.size +project_index+1)!}</td>
	                <td class="content table-content-hidden">${(project.projectName)!}</td>
                    <td class="content table-content-hidden">${(project.projectHost)!}</td>
                    <td class="content table-content-hidden">${(project.projectDesc)!'--'}</td>
	                <td>
                        <div style='text-align: center;'>
                            <a class="fa fa-pencil-square-o dialog" href="javascript:;" data-url="/u/project/edit/${(project.id)!}" data-title="编辑用户" data-width="850" data-height="400" data-toggle="tooltip" title="编辑" data-placement="bottom"></a>
                            <a class="fa fa-times" data-toggle="tooltip" title="删除" data-placement="bottom"
                             data-tiggle="ajax"
                             data-submit-url="/u/project/delete?id=${(project.id)!}"
                             data-confirm="您确定要删除该条记录吗?"></a>
                        </div>
                    </td>
	              </tr>
              </#list>
            </table>
          </div><!-- /.box-body -->
          <div class="box-footer row">
            <div class="col-md-6">
         	  <#include "/common/paginateBar.html" />
	  		  <@paginate pageData=pageData actionUrl="/system/dept/list/" urlParas="?search=${search!}"  />
            </div>
            <div class="col-md-6 pull-left">
	             <#include "/common/paginate.html" />
	  			 <@paginate currentPage=pageData.getCurrent() totalPage=pageData.getPages() actionUrl="/system/dept/list/" urlParas="?search=${search!}&pageSize=${pageSize!}"  />
            </div>
          </div>
        </div><!-- /.box -->
      </div>
    </div>
  </section><!-- /.content -->
</div><!-- /.content-wrapper -->
</@body>
<@footer>
</@footer>